
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--        <link href="<?php echo base_url('public_source/css_source/register.css')?>" rel="stylesheet" type="text/css">-->
                    <script src="<?php echo base_url('public_source/javascript/jquery-1.9.1.js');?>" type="text/javascript"></script>
<script src="<?php echo base_url('public_source/javascript/jquery-ui.js');?>" type="text/javascript"></script>
<!--<script>
        $(document).ready(function(){
            $("#country").change(function(){
		$.ajax({
			type: "POST",
			url: "<?php echo site_url("home_admin/ajax_gethang2") ?>",
			data: {maloai : $(this).val()},
			async: false,
			beforeSend: function(){
				$("#sg").html("");
			},
			success: function(kq){
				$("#sg").html(kq);
			}
		});
                
		$.ajax({
			type: "POST",
			url: "<?php echo site_url("home_admin/ajax_getdong2") ?>",
			data: {mahang : $("#hang").val()},
			async: false,
			beforeSend: function(){
				$("#result").html("");
			},
			success: function(kq){
				$("#result").html(kq);
			}
		});
		return false;
                });
                });
</script>-->
    </head>

    <style>
        #add_song input, select {padding: 4px; width: 250px}
    </style>
    <body>
        <div ID="add_song">
            <div class="error" style="padding-left: 20px; border: red thin solid">
                <?php
                    echo validation_errors('<li>','</li>');
                    if(isset($error) && $error!="" && !empty($error))
                        echo $error;
                ?>
            </div>
            <form action="" method="post" enctype="multipart/form-data">
                <table style="font-size: 13px; color:  #555555; padding: 4px" cellspacing="20px">
                    <tr>
                        <td><strong>Tên sản phẩm</strong></td>
                        <td><input name="tenbaihat" type="text" value="<?php echo $file["fldTenDong"] ?>"></td>
                    </tr>
                    <tr>
                        <td><strong>Loại sản phẩm</strong></td>
                        <td>
                            <select id="country" name="country">
                                <?php 
                                    foreach ($loai as $item)
                                    {
                                        if ($file["fldMaSanPham"] == $item["maloai"])
                                        {
                                            echo "<option value='".$item["maloai"]."' selected='selected'>";
                                            echo $item["tenloai"];
                                            echo "</option>";
                                        }
                                        else 
                                        {
                                            echo "<option value='".$item["maloai"]."'>";
                                            echo $item["tenloai"];
                                            echo "</option>";
                                        }
                                    }
                                ?>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td><strong>Hãng sản xuất</strong></td>
                        <td>
                            <?php $this->load->view("edit_sp/select_hang"); ?>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <input name="submit" type="submit" value="Send">
                        </td>
                    </tr>
                </table>
            </form>
            </div>
        </div>
    </body>
</html>